// reset css
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

ul,
ol {
    list-style: none;
}

// 使用rem布局
body {
    background: url(../images/bg2.png) no-repeat top center;
    line-height: 1.15;
}

@font-face {
    font-family: electronicFont;
    src: url(../font/DS-DIGIT.TTF);
}

// 头部
.head_box {
    position: relative;
    // 高度100px
    height: 1.25rem;
    background: url(../images/head_bg.png) no-repeat;
    background-size: 100% 100%;

    h1 {
        // 字体大小38px
        font-size: .475rem;
        color: #fff;
        text-align: center;
        line-height: 1rem;
    }

    .time {
        position: absolute;
        // right: 30px
        right: .375rem;
        top: 0;
        color: rgba(255, 255, 255, 0.7);
        // 字体大小20px
        font-size: .25rem;
        // 行高75px
        line-height: .9375rem;
    }
}

// 页面主体
.main_box {
    display: flex;
    min-width: 1024px;
    max-width: 1920px;
    margin: 0 auto;
    padding: .125rem .125rem 0;

    .col {
        flex: 3;

        &:nth-child(2) {
            flex: 5;
            overflow: hidden; // 非常重要，没有这句话,页面高度就会起伏不定
        }

        .grid {
            position: relative;
            height: 3.875rem;
            border: 1px solid rgba(25, 186, 139, 0.17);
            background: rgba(25, 186, 139, 0.04);
            // padding: 0 15px 40px
            padding: 0 .1875rem .5rem;
            // margin-bottom: 15px
            margin-bottom: .1875rem;

            &::before {
                content: "";
                position: absolute;
                top: 0;
                left: 0;
                width: 10px;
                height: 10px;
                border-top: 2px solid #78c5ce;
                border-left: 2px solid #78c5ce;
            }

            &::after {
                content: "";
                position: absolute;
                top: 0;
                right: 0;
                width: 10px;
                height: 10px;
                border-top: 2px solid #78c5ce;
                border-right: 2px solid #78c5ce;
            }

            .grid_footer {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;

                &::before {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 10px;
                    height: 10px;
                    border-bottom: 2px solid #78c5ce;
                    border-left: 2px solid #78c5ce;
                }

                &::after {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    right: 0;
                    width: 10px;
                    height: 10px;
                    border-bottom: 2px solid #78c5ce;
                    border-right: 2px solid #78c5ce;
                }
            }

            h2 {
                // height: 48px
                height: .6rem;
                line-height: .6rem;
                text-align: center;
                color: #fafafa;
                font-weight: normal;
            }

            .chart {
                // height: 240px
                height: 3rem;
                // background-color: gold;
            }
        }
    }
}

// 上面的太多了，就不去找嵌套位置了
.statistic {
    background-color: rgba(101, 132, 226, 0.1);
    // padding: 15px
    padding: .1875rem;
    // 左右10px margin
    margin: 0 .125rem;

    .numbers {
        position: relative;
        border: 1px solid rgba(25, 186, 139, 0.17);

        ul {
            display: flex;

            li {
                position: relative;
                flex: 1;
                // 行高80px，字体大小70px
                line-height: 1rem;
                font-size: .875rem;
                color: #ffeb7b;
                text-align: center;
                // 使用图标字体,在顶部预先定义下图标字体,然后再使用
                font-family: 'electronicFont';

                // 通过第1个li的伪元素，添加两个li之间的分割线
                &:nth-child(1)::after {
                    content: "";
                    width: 1px;
                    height: 50%;
                    background-color: rgba(25, 186, 139, 0.17);
                    position: absolute;
                    top: 25%;
                    right: 0;
                }
            }
        }

        // 通过div.numbers的伪元素，添加左上和右下的角
        &::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 20px;
            height: 10px;
            border-top: 2px solid #78c5ce;
            border-left: 2px solid #78c5ce;
        }

        &::after {
            content: "";
            position: absolute;
            bottom: 0;
            right: 0;
            width: 20px;
            height: 10px;
            border-bottom: 2px solid #78c5ce;
            border-right: 2px solid #78c5ce;
        }
    }

    .des {
        ul {
            display: flex;

            li {
                flex: 1;
                // 字号 18px, 行高40px, 上内边距 10px
                font-size: .225rem;
                line-height: .5rem;
                padding-top: .125rem;
                text-align: center;
                color: rgba(255, 255, 255, 0.7);
            }
        }
    }
}

// 中国地图模块
.map {
    position: relative;
    // 高度 800px
    height: 10rem;
    // background-color: gold;
    margin: 0 .125rem;

    .map1 {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        // 宽 高 都是643px
        width: 8.0375rem;
        height: 8.0375rem;
        background: url(../images/map1_bg.png) no-repeat;
        background-size: 100% 100%;
        animation: rotate1 15s linear infinite;
        opacity: 0.5;
    }

    .map2 {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        // 宽 高 都是566px
        width: 7.075rem;
        height: 7.075rem;
        background: url(../images/map2_bg.png) no-repeat;
        background-size: 100% 100%;
        animation: rotate2 15s linear infinite;
        opacity: 0.5;
    }

    .chart {
        position: absolute;
        top: 0;
        left: 0;
        // chart要跟父盒子容器一样大小。宽度100% 高度800px
        width: 100%;
        height: 10rem;
        // background-color: gold;
    }
}

// 定义球体旋转的动画
@keyframes rotate1 {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotate2 {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}